<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改单位资质资源')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-business-edit" th:object="${source}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">资源名称：</label>
                <div class="col-sm-8">
                    <input name="sourceName" th:field="*{sourceName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">资源简称：</label>
                <div class="col-sm-8">
                    <input name="sourceShortName" th:field="*{sourceShortName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">资源编码：</label>
                <div class="col-sm-8">
                    <input name="sourceCode" th:field="*{sourceCode}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label ">资源类型：</label>
                <div class="col-sm-8">
                    <select name="sourceType" class="form-control m-b" >
                        <option th:each="item,index : ${business_res_type}" th:value="${item.dictValue}">[[${item.dictLabel}]]</option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label ">资源介绍：</label>
                <div class="col-sm-8">
                    <input name="sourceIntroduce" th:field="*{sourceIntroduce}" class="form-control" type="text" >
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label ">资源备注：</label>
                <div class="col-sm-8">
                    <textarea name="sourceTip" class="form-control" >[[*{sourceTip}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "ruoyi-business/business";
        $("#form-business-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-business-edit').serialize());
            }
        }

        $("input[name='uploadDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='maintainDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>